package com.qfedu.edu.seckill.constance;

/**
 * @author xiaobobo
 * @title: RedisConstance
 * @projectName cd-java-2404-seckill-parent
 * @description: TODO
 * @date 2025/1/14  9:41
 */
public class RedisConstance {

    //商品库存的前缀
    private static final String PRO_STOCK_PREFIX = "pro:stock:";

    //请求限流的前缀
    private static final String REQ_LIMIT_PREFIX = "req:";

    //这个是黑名单的前缀
    private static final String REQ_BLACK_PREFIX = "black:";

    //下面是用户购买商品的状态的前缀
    private static final String USER_SELL_STATUS_PREFIX = "sell:status:";

    //统计购买商品人数的这个前缀
    private static final String COUNT_SELL_PREFIX = "count:sell:";

    //减库存的前缀
    private static final String REDUCE_STOCK_PREFIX = "reduce:stock:";

    //支付结果的前缀
    private static final String PAY_RESULT_PREFIX = "pay:result:";

    public static String getPayResultPrefix() {
        return PAY_RESULT_PREFIX;
    }

    public static String getReduceStockPrefix() {
        return REDUCE_STOCK_PREFIX;
    }

    public static String getCountSellPrefix() {
        return COUNT_SELL_PREFIX;
    }

    public static String getUserSellStatusPrefix() {
        return USER_SELL_STATUS_PREFIX;
    }

    public static String getReqBlackPrefix() {
        return REQ_BLACK_PREFIX;
    }

    public static String getReqLimitPrefix() {
        return REQ_LIMIT_PREFIX;
    }

    public static String getProStockPrefix() {
        return PRO_STOCK_PREFIX;
    }
}
